// 3. ofstream 
// build : g++ 3.ofstream_test.cpp
#include <iostream>
#include <fstream>
using namespace std;
int main(int argc, char** argv )
{
    std::string file_pwd = "/home/hyaline/small-code-base/C++_code_base/STD_test/ofstream_test.log";
    std::ofstream clean_file(file_pwd, std::ios_base::trunc);
    clean_file.close();

    // 1. If the file doesn't exist, the program will create it.
    // 2. If the file already exists, it will clean all text. because of the "ios::trunc flag."

}

